import {compareForms} from './formLog.js'


// 示例使用
const validFormOld = {  
    name: 'tom',  
    age: 18,  
    hobby: ['ball', 'bat'],  
    scores: [80, 85, 91, 100],  
    friends: [  
        { name: 'jerry' },  
        { name: 'duck' }  
    ],  
    body: {  
        weight: 50,  
        height: 150  
    }  
};  

const validFormNew = {  
    name: 'tommy',  
    age: 18,  
    hobby: ['bat','ball1'],  
    scores: [80, 85, 91, 100],  
    friends: [  
        { name: 'goose' },
        { name: 'rabbit' } ,
        { name: 'jerry' }
    ],  
    body: {  
        weight: 55,  
        height: 150  
    }  
};  
const formMap = {  
    name: '姓名',  
    age: '年龄',  
    hobby: '爱好',  
    scores: '成绩',  
    friends: {name:'伙伴名称'},  
    body: {  
        weight: '体重',  
        height: '身高'  
    }  
}; 
const logStr=compareForms(validFormOld, validFormNew, formMap);
console.log(logStr,666)